package com.lemon.controller;
import com.lemon.domain.Result;
import java.util.List;

import com.lemon.domain.vo.PcdVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.lemon.domain.Pcd;
import com.lemon.service.PcdService;

/**
 * 省市区Controller
 * 
 * @author ruoyi
 * @date 2025-08-03
 */
@RestController
@RequestMapping("/pcd")
public class PcdController
{
    @Autowired
    private PcdService pcdService;

    /**
     * 查询省市区列表
     */
    @GetMapping("/list")
    public Result list()
    {
        List<PcdVo> list = pcdService.getAll();
        return Result.success(list);
    }

    @GetMapping("/cityList")
    public Result cityList(){
        List<PcdVo> list = pcdService.getCityList();
        return Result.success(list);
    }

}
